package com.example.client;

import com.example.api.api.IUserService;
import com.example.client.rpc.RpcClientProxy;
import lombok.extern.slf4j.Slf4j;

import java.time.LocalDateTime;

/**
 * @author heyuduo
 * @date 2022/6/18 16:38
 */
@Slf4j
public class ClientBootStrap {

    public static void main(String[] args) {
        RpcClientProxy proxy = new RpcClientProxy();
        IUserService userService = proxy.clientProxy(IUserService.class, "localhost", 8888);
        log.info("[{}] 客户端开始发起RPC调用", LocalDateTime.now());
        String name = userService.findNameById(101L);
        System.out.println(name);
    }
}
